package mark.tom.gear.base.utils

import android.app.Activity
import android.content.res.Resources
import com.hundsun.gmubase.utils.StatusBarUitl

/**
 * @Description: SystemBar工具类
 * @Author: ttmk110@163.com
 * @Package: mark.tom.gear.base.utils
 * @Date: 2021/1/19
 * @Copyright: 版权归 Mark 所有
 * <ModifyLog>
 * @ModifyContent:
 * @Author:
 * @Date:
 * </ModifyLog>
 */
object SystemBarUtil {

    /**
     * Description: 获取状态栏高度
     * Copyright: Copyright (c) 2020
     * Project: Gear
     * Author: ttmk110@163.com
     * Date: 2021/1/19 13:29
     */
    fun getStatusBarHeight(mResources: Resources): Int {
        var height = 0
        val resourceId: Int = mResources.getIdentifier("status_bar_height", "dimen", "android")
        if (resourceId > 0) {
            height = mResources.getDimensionPixelSize(resourceId)
        }
        return height
    }

    fun setStatusTextColor(useDart: Boolean, mActivity: Activity) {
        StatusBarUitl.setStatusTextColor(useDart, mActivity)
    }
}